package com.xiaoyu.lanling.event.chat

import com.xiaoyu.base.event.BaseEventWithTag
import com.xiaoyu.im.ChatToken
import com.xiaoyu.lanling.feature.chat.model.message.ChatMessageBaseItem

class MessageListUpdateEvent : BaseEventWithTag {

    val list: List<ChatMessageBaseItem>
    val newLoad: Boolean
    val isFromSearch: Boolean
    val messageIndex: Int
    val messageId: String

    constructor(chatToken: ChatToken?, list: List<ChatMessageBaseItem>, newLoad: Boolean, isFromSearch: Boolean, messageIndex: Int) : super(chatToken) {
        this.list = list
        this.newLoad = newLoad
        this.isFromSearch = isFromSearch
        this.messageIndex = messageIndex
        messageId = ""
    }

    constructor(chatToken: ChatToken?, list: List<ChatMessageBaseItem>, newLoad: Boolean, isFromSearch: Boolean, messageIndex: Int, messageId: String) : super(chatToken) {
        this.list = list
        this.newLoad = newLoad
        this.isFromSearch = isFromSearch
        this.messageIndex = messageIndex
        this.messageId = messageId
    }
}